//
//  MaiTangTangCollectionViewCell.m
//  project_delicious
//
//  Created by dlios on 15-3-24.
//  Copyright (c) 2015年 lanou3g.com 蓝鸥科技. All rights reserved.
//

#import "MaiTangTangCollectionViewCell.h"

@implementation MaiTangTangCollectionViewCell
- (void)dealloc
{
    [_picImageView release];
    [_nameLabel release];
    [super dealloc];
}

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        self.picImageView = [[UIImageView alloc] init];
        [self.contentView addSubview:self.picImageView];
        [_picImageView release];
        
        self.nameLabel = [[UILabel alloc] init];
        [self.contentView addSubview:self.nameLabel];
        [_nameLabel release];
        
        
    }
    return self;
}

- (void)applyLayoutAttributes:(UICollectionViewLayoutAttributes *)layoutAttributes
{
    [super applyLayoutAttributes:layoutAttributes];
    CGFloat widths = layoutAttributes.bounds.size.width;
    CGFloat heights = layoutAttributes.bounds.size.height;
    self.picImageView.frame = CGRectMake(0, 0, widths, heights * 4 / 5);
    self.nameLabel.frame = CGRectMake(0, heights * 4 / 5, widths, heights / 5);
    
    
}

@end
